home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Communications
/
Converse
/
Source
/
TextAppend.m
< prev
next >
Wrap
Text File
|
1995-12-28
|
675b
|
27 lines
#import "TextAppend.h"
@implementation Text(Append)
/* appendString: - append value of a string to the end of Text. */
- (void)appendString:(NSString *)aString
{
[self setSel:[self textLength] :[self textLength]];
[self replaceSel:[aString cString]];
[self scrollSelToVisible];
}
/* appendString: - append value of a string to the end of Text with a specific font style. */
- (void)appendString:(NSString *)aString withFontStyle:(NXFontTraitMask)traits
{
int originalLength = [self textLength];
//** append text
[self appendString:aString];
//** set font style
[self setSel:originalLength :[self textLength]];
[self setSelFontStyle:traits];
}
@end